package com.tdrc.common.beans;

/**
 * @author dpf
 * @version 1.0
 * @date 2020-5-29 16:46
 * @instruction 前端前端构造类，不做是数据库表的映射实体类
 */

import com.alibaba.druid.util.StringUtils;

import java.util.Set;

public class Permission {
    private Integer roleId;
    private Integer menuId;
    private String permissionId;
    private String roleName;
    private Set<ActionEntity> actionEntitySet;
    final static String  URL_SEPARATOR = "/";

    public Permission(){

    }

    public Permission(Integer roleId, Integer menuId, String permissionId, String roleName, Set<ActionEntity> actionEntitySet) {
        this.roleId = roleId;
        this.menuId = menuId;
        this.permissionId = permissionId;
        this.roleName = roleName;
        this.actionEntitySet = actionEntitySet;
    }

    public Integer getRoleId() {
        return roleId;
    }

    public void setRoleId(Integer roleId) {
        this.roleId = roleId;
    }

    public Integer getMenuId() {
        return menuId;
    }

    public void setMenuId(Integer menuId) {
        this.menuId = menuId;
    }

    public String getPermissionId() {
        return permissionId;
    }

    public void setPermissionId(String permissionId) {
        this.permissionId = permissionId;
    }

    public String getRoleName() {
        return roleName;
    }

    public void setRoleName(String roleName) {
        this.roleName = roleName;
    }

    public Set<ActionEntity> getActionEntitySet() {
        return actionEntitySet;
    }

    public void setActionEntitySet(Set<ActionEntity> actionEntitySet) {
        this.actionEntitySet = actionEntitySet;
    }

    /**
     * 角色权限内部类，包含权限名称、权限描述
     */
    public static class ActionEntity{
        private String action;
        private String describe;
        private String shiroAction;

        public String getAction() {
            return action;
        }

        public void setAction(String action) {
            this.action = action;
        }

        public String getDescribe() {
            return describe;
        }

        public void setDescribe(String describe) {
            this.describe = describe;
        }

        public String getShiroAction() {
            return shiroAction;
        }

        public void setShiroAction(String shiroAction) {
            this.shiroAction = shiroAction;
        }
    }




}
